<!--
 * @Author: sundeqi
 * @Date: 2022-03-30 09:53:51
 * @LastEditors: sundeqi
 * @LastEditTime: 2022-03-30 18:36:53
 * @Description: facebook直播iframe
-->
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Facebook Live Stream</title>
    <meta name="viewport"
        content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <script>
        // window.onload = function () {
        //     //var query = window.location.search.substring(1);
        //     var src = 'https://www.facebook.com/LeggyReki/videos/1677055022639033/';
        //     loadSrc(src);
        //     var bgDiv = document.getElementsByClassName('upcoming-bg')[0];
        //     bgDiv.style.backgroundImage =
        //         'url("https://img.staticbg.com/banggood/infllive/20220301213813_128.jpg")';
        // };

        function loadSrc(src) {
            var href = encodeURIComponent(src)
            document.getElementById('gkbLiveFrame').src =
                'https://www.facebook.com/plugins/video.php?href=' + href +
                '&show_text=false&t=0';
            // var videoDiv = document.getElementsByClassName('fb-video')[0];
            // videoDiv.setAttribute("data-href", src);
            // var embed = document.getElementsByClassName('fb-embed');
            // embed[0].cite = src;
        }
    </script>
    <link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <div class="container-bg">
        <div class="upcoming-bg"> </div>
        <div class="live-box">
            <!-- https://www.facebook.com/plugins/video.php?height=314&href=https%3A%2F%2Fwww.facebook.com%2FLeggyReki%2Fvideos%2F1677055022639033%2F&show_text=false&width=560&t=0 -->
            <iframe id="gkbLiveFrame" src="" width="100%" height="50%" style="border:none;overflow:hidden;
    margin: auto;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;" scrolling="no" frameborder="0" allowfullscreen="true"
                allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"
                allowFullScreen="true"></iframe>
            <!-- Load Facebook SDK for JavaScript -->
            <!-- <div id="fb-root"></div> -->
            <!-- crossorigin="anonymous"  nonce="GczY2zbc"-->
            <!-- <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v13.0"
        nonce="GczY2zbc">
    </script> -->

            <!-- Your embedded video player code -->
            <!-- <div class="fb-video" data-href="" data-width="500" data-show-text="false">
        <div class="fb-xfbml-parse-ignore">
            <blockquote class="fb-embed" cite="">   </blockquote>
        </div>
    </div> -->
        </div>
    </div>
    </div>

</body>

</html>